<?php
/**
 * Created by PhpStorm.
 * 定时操作业务（用于liunx定时调用）
 * User: caicm
 * Date: 2017/6/30
 * Time: 15:56
 */

namespace WMApi\Controller;


use Think\Controller;
use WMApi\Service\SellerOrderService;

class TimingOperationController extends Controller {

    protected function _initialize() {
        header("Access-Control-Allow-Origin: *");
    }

    /**
     * 商家订单结算
     * 执行时间：每天凌晨0点调取
     * Created By caicm
     */
    public function seller_order_clearing(){
        $order_service = new SellerOrderService();
        $state = $order_service->seller_order_clearing();
        if($state){
            print_r($state);
        }else{
            print_r('没有可结算的订单');
        }

    }


}